Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import math | |
import matplotlib.pyplot as plt | |
import torch | |
import torch.nn as nn | |
from sklearn.datasets import make_moons | |
from torch import Tensor | |
from tqdm import tqdm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useRef } from 'react' | |
// playground: https://stackblitz.com/edit/react-ts-nv5fxe?file=App.tsx | |
export default function App() { | |
// create a ref and declare an instance for each countUp animation | |
const countupRef = useRef(null); | |
let countUpAnim; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import easy_llama as ez | |
from subprocess import run | |
USER = ez.utils.USER_STYLE | |
BOT = ez.utils.BOT_STYLE | |
DIM = ez.utils.DIM_STYLE | |
RESET = ez.utils.RESET_ALL | |
def say(something: str) -> None: | |
run(['say', something]) | |
Llama3 = ez.Model( | |
'Meta-Llama-3-8B-Instruct-q8_0.gguf', |
A list of GitHub emoji markup, adapted from rxavier’s Complete list of github markdown emoji markup, generated with a Grunt script for maintainability (see repository).
Smileys and People
Animals and Nature
Food and Drink
Activity
Travel and Places
Objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
getCotizacionesWS(); | |
function getCotizacionesWS(){ | |
$context = [ | |
"ssl" => [ | |
"verify_peer" => FALSE, | |
"verify_peer_name" => FALSE, | |
'crypto_method' => STREAM_CRYPTO_METHOD_TLS_CLIENT |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getCotizaciones($monedas = true) | |
{ | |
$url = 'https://www.bcu.gub.uy/_layouts/BCU.Cotizaciones/handler/CotizacionesHandler.ashx?op=getcotizaciones'; | |
$data = ""; | |
$last_date_found = false; | |
$diff = 1; | |
$cotizaciones = array(); | |
$codigosAceptados = array("USD", "EURO", "CHF", "GBP", "ARS", "BRL", "JPY", "U.I."); |
NewerOlder